package com.gistmap.sideline.util;

import cn.hutool.core.util.StrUtil;
import cn.hutool.crypto.SecureUtil;
import cn.hutool.crypto.symmetric.AES;

public class Test {
    public static void main(String[] args) {
        AES aes = SecureUtil.aes("nicenicenicenice".getBytes());
        String encrypt = aes.encryptBase64("123456momod");
        System.out.println(encrypt);

        byte[] decrypt = aes.decrypt(encrypt);
        String str = new String(decrypt);
        System.out.println(str);

        String realPassword = StrUtil.sub(str, 0,str.length()-5);
        System.out.println(realPassword);

        String pass = aes.encryptBase64(realPassword + "sidelinex");
        System.out.println(pass);
    }
}
